//
//  DataModels.swift
//  BWNetworkKit_Example
//
//  Created by zhuxuhong on 2022/3/3.
//  Copyright © 2022 CocoaPods. All rights reserved.
//

import HandyJSON
import BWNetworkKit

struct Shiwen: HandyJSON {
    var idnew: String = ""
    var cont: String = ""
    var author: String?
    var chaodai: String?
    var source: String?
    
    mutating func mapping(mapper: HelpingMapper) {
        mapper.specify(property: &source, name: "nameStr")
        mapper.specify(property: &cont) {
            var str = $0
            str = str.replacingOccurrences(of: "<br/>", with: "\n\n")
            str = str.replacingOccurrences(of: "<br />", with: "\n\n")
            str = str.replacingOccurrences(of: "<p>", with: "")
            str = str.replacingOccurrences(of: "</p>", with: "\n")
            return str
        }
    }
}
struct Mingju: HandyJSON {
    var idnew: String = ""
    var nameStr: String = ""
    var author: String?
    var source: String?
}

struct GushiwenRecommend: HandyJSON, Requestable {
    typealias T = Self
    
    var gushiwens: [Shiwen] = []
    var mingjus: [Mingju] = []
    var sumPage4: Int = 0
    func mapping(mapper: HelpingMapper) {
    }
}
